Skip to content

DOC Replace @doc decorator with inline docstring in core/arrays/sparse/array.py#63941

Merged
mroeschke merged 5 commits intopandas-dev:mainfrom
evensong:sparse-array-replace-@doc
Jan 30, 2026
Merged

DOC Replace @doc decorator with inline docstring in core/arrays/sparse/array.py#63941
mroeschke merged 5 commits intopandas-dev:mainfrom
evensong:sparse-array-replace-@doc

Conversation

@evensong
Copy link
Contributor

@evensong evensong commented Jan 29, 2026

… a copy of the docstring from the ExtensionArray duplicated method.
@evensong
Copy link
Contributor Author

This is my first PR to this repo, so if I've fudged normal policy anywhere, just let me know!


Examples
--------
>>> pd.array([1, 1, 2, 3, 3], dtype="Int64").duplicated()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you modify this example to use a SparseDtype(np.int64) to match the parent class?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring check script threw an error after I made the changes, but I'm not sure why. I ran the example code from the docstring and it executes normally. I pushed the commit to this branch so you can see; do you know what is making it fail the test?

@mroeschke mroeschke added the Docs label Jan 29, 2026
@evensong
Copy link
Contributor Author

I've made the change in my local feature branch, but am having some issues pushing them to the remote feature branch.

@mroeschke mroeschke merged commit f0161bc into pandas-dev:main Jan 30, 2026
41 of 42 checks passed
@mroeschke mroeschke added this to the 3.1 milestone Jan 30, 2026
@mroeschke
Copy link
Member

Thanks @evensong

@evensong evensong deleted the sparse-array-replace-@doc branch January 30, 2026 20:50
Aryn1102 pushed a commit to Aryn1102/pandas that referenced this pull request Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants